package com.example.ssmHomework1.entity;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;

public class InstanceA {
    private  InstanceB b;

    @Autowired
   // @Qualifier("B")
    public void setB(InstanceB b) {
        this.b = b;
    }
    public InstanceB getB() {
        return b;
    }



    public void getInstanceByA(){
        b.getInstance();
    }
    public void getInstanceByA2(){
        b.getInstance2();
    }

    public void display(){
        System.out.println("A...");
    }

}
